🧮 Subset Sum Count and Operation Tool (Backtracking)

Input Parameters

Lucy's Subset Sum Count

Lucy has a set of integers, and she is interested in finding out how many subsets from this set sum up to a specific target number. The program should efficiently calculate the number of subsets that sum up to a given target sum.

Additionally, a mathematical operation is performed on the count (C):

  • If C is **even**, result $= C \times 3$.
  • If C is **odd**, result $= C + 7$.

Sample Input/Output

Input (Sample 1):
4
1 3 5 2
6

Output:
2
6